﻿using System;
using System.Collections.Generic;
/************************************************************************************************************************************
 Copyright © 2010 - Banco Itaú BBA S.A

 PageGarantiaContratoPresenter :

 Histórico de Alterações:
 28/10/2010 - Aline Abreu Alves (AAALVES)	- Criacao OS423540
 26/10/2012 - Murilo Figueiredo             - Geração do Relatório de Garantias PGR3 em Arquivo Excel na Camada de Negócio - OS277681
 
************************************************************************************************************************************/

namespace ibba.src.norisk
{
    public class PageGarantiaContratoPresenter
    {
        private ServiceGarantiaContrato.IGarantiaContrato _serviceGarantiaContrato;

        public PageGarantiaContratoPresenter()
        {
            _serviceGarantiaContrato = ServiceFactory.GetInstance().ServiceGarantiaContrato;
        }

        public void ObterGarantiaContrato(string codContrato, AsyncCallback pAsyncCallback)
        {
            _serviceGarantiaContrato.BeginObterGarantiaContrato(codContrato, pAsyncCallback, _serviceGarantiaContrato);
        }

        public void AtualizarGarantiaContrato(List<ibba.src.norisk.ServiceGarantiaContrato.GarantiaContrato> _list, string cdUsuario, bool pIcPlanilha, AsyncCallback pAsyncCallback)
        {
            _serviceGarantiaContrato.BeginAtualizarGarantiaContrato(_list, cdUsuario, pIcPlanilha, pAsyncCallback, _serviceGarantiaContrato);
        }

        public void IncluirGarantiaContrato(List<ibba.src.norisk.ServiceGarantiaContrato.GarantiaContrato> _list, string cdUsuario, AsyncCallback pAsyncCallback)
        {
            _serviceGarantiaContrato.BeginIncluirGarantiaContrato(_list, cdUsuario, pAsyncCallback, _serviceGarantiaContrato);
        }

        //OS686793 - Início
        public void ObterGarantiaPGR3(string IcFormalizada, int IdGrupoGarantia, int IdGrupoOperacao, int IdGarantidor, int IdNatureza, int IdBem, int IdInstrumento, DateTime DtBase, AsyncCallback pAsyncCallback)
        {
            _serviceGarantiaContrato.BeginObterGarantiaPGR3(IcFormalizada, IdGrupoGarantia, IdGrupoOperacao, IdGarantidor, IdNatureza, IdBem, IdInstrumento, DtBase, pAsyncCallback, _serviceGarantiaContrato);
        }

        public void ObterGarantidor(AsyncCallback pAsyncCallback)
        {
            _serviceGarantiaContrato.BeginObterGarantidor(pAsyncCallback, _serviceGarantiaContrato);
        }

        public void ObterGrupoCliente(AsyncCallback pAsyncCallback)
        {
            _serviceGarantiaContrato.BeginObterGrupoCliente(pAsyncCallback, _serviceGarantiaContrato);
        }
        //OS686793 - Fim

        #region 26/10/2012 - OS277681
        public void GerarRelatorioGarantiaPGR3(string IcFormalizada, int IdGrupoGarantia, int IdGrupoOperacao, int IdGarantidor, int IdNatureza, int IdBem, int IdInstrumento, DateTime DtBase, AsyncCallback pAsyncCallback)
        {
            _serviceGarantiaContrato.BeginGerarRelatorioGarantiaPGR3(IcFormalizada, IdGrupoGarantia, IdGrupoOperacao, IdGarantidor, IdNatureza, IdBem, IdInstrumento, DtBase, pAsyncCallback, _serviceGarantiaContrato);
        }
        #endregion
    }
}
